package hottargui.standard;

import hottargui.framework.Player;
import hottargui.framework.PlayerColor;
import hottargui.framework.Position;

/** Standard Player implementation. */

/* 2008-05-04 added responsibility for knowing settlement position */

public class StandardPlayer implements Player {
	private int coins;
	private PlayerColor color;
	private Position settlement;

	public StandardPlayer(PlayerColor c) {
		color = c;
		coins = 10;
	}

	public PlayerColor getColor() {
		return color;
	}

	public int getCoins() {
		return coins;
	}

	/**
	 * withdraw from treasury. PreCondition: amount >= coins
	 */
	public void withdraw(int amount) {
		coins -= amount;
	}

	/** add to the treasury. */
	public void add(int amount) {
		coins += amount;
	}

	public void setSettlement(Position settlementPos) {
		settlement = settlementPos;
	}

	public Position getSettlement() {
		return settlement;
	}
}
